<?php
/**
 * @var $this \yii\web\View
 * @var $dataProvider \yii\data\ArrayDataProvider
 * @var $searchModel \app\modules\admin\models\search\AuthItemSearch
 * @var $context \app\modules\admin\components\ItemController
 * Created by PhpStorm.
 * User: jiangjunxian
 * Date: 2016/12/2
 * Time: 16:22
 */
use app\modules\admin\widgets\gird\GridWidget;
use yii\bootstrap\Html;

$context = $this->context;
$labels = $context->labels();

$this->title = $labels['Items'];
$this->params['breadcrumbs'][] = $this->title;

?>
<div class="row">
    <div class="col-sm-12">
        <?= GridWidget::widget([
            'dataProvider' => $dataProvider,
            'filterModel' => $searchModel,
            'title' => $this->title,
            'toolButtons' => [
                Html::a('新建'.$labels['Item'], ['create'], ['class'=>'btn btn-success']),
            ],
            'columns' => [
                'name',
                'description',
                'ruleName',
                ['class' => 'yii\grid\ActionColumn',]
            ]
        ]) ?>
    </div>
</div>
